<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Function start</title>
    <style>
      .msgBox {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 200px;
        background: #eee;
      }

      .msgBox p {
        line-height: 1.5;
        padding: 10px 20px;
        color: #333;
      }

      .msgBox button {
        background: none;
        border: none;
        position: absolute;
        top: 0;
        right: 0;
        font-size: 1.1rem;
        color: #aaa;
      }

    </style>
  </head>
  <body>
    <button>Display message box</button>

    <script>
      
    </script>
  </body>
</html>